<?php
	
	
	Class User {

		// user_id
		protected $id;

		// 用户名
		protected $userName;

		/**nickname**/
		protected $nickname;

		// 获取用户ID
		public function getId()
		{
			return $this->id;
		}

		// 获取用户名
		public function getUserName()
		{
			return $this->userName;
		}

		// 设置用户名
		public function setUserName($name)
		{
			return $this->userName = $name;
		}

	}


	try {

		$reflectionClass = new \ReflectionClass("User");

		// 导出类
		ReflectionClass::export("User");

		// 获取某个类的所有方法
		//$methods = $reflectionClass->getProperties();

		// 获取指定属性
		//$property = $reflectionClass->getProperty("nickname")->getDocComment();

		//var_dump(ReflectionProperty::IS_PROTECTED);die;

		//var_dump($reflectionClass->getProperties(1024));die;

		//var_dump($property);die;

	} catch(\Exception $e) {

		var_dump($e->getMessage());die;

	}

	
?>